home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacApp Release 10 / MacApp Release 10 - HD Ready / Examples / Skeleton / UDocumentSkeleton.h < prev    next >
Encoding:
Text File  |  1996-04-03  |  1.6 KB  |  59 lines  |  [TEXT/MPS ]

  1. // UDocumentSkeleton.h
  2. // Copyright © 1991-96 by Apple Computer, Inc. All rights reserved. 
  3.  
  4. #ifndef __UDOCUMENTSKELETON__
  5. #define __UDOCUMENTSKELETON__
  6.  
  7. #ifndef __UFILEBASEDDOCUMENT__
  8. #include "UFileBasedDocument.h"
  9. #endif
  10.  
  11. //----------------------------------------------------------------------------------------
  12. // Constants
  13. //----------------------------------------------------------------------------------------
  14.  
  15. // Commands
  16. const CommandNumber cCommandHandledByDocument = 401;
  17.  
  18. // Files
  19. const OSType kFileType = 'SF01';    // File-type code used for document files 
  20.  
  21. //----------------------------------------------------------------------------------------
  22. // TDocumentSkeleton
  23. //----------------------------------------------------------------------------------------
  24.  
  25. class TDocumentSkeleton: public TFileBasedDocument
  26. {
  27.     MA_DECLARE_CLASS;
  28.     
  29.   public:
  30.     TDocumentSkeleton(); 
  31.         // Constructor
  32.     
  33.     virtual ~TDocumentSkeleton();
  34.         // Destructor
  35.     
  36.     virtual void  IDocumentSkeleton(TFile* itsFile, OSType itsCreator);
  37.     virtual void  DoInitialState(); // Override
  38.     virtual void  FreeData(); // Override
  39.             
  40.     // Views
  41.     virtual void  DoMakeViews(Boolean forPrinting); // Override
  42.  
  43.     // Commands
  44.     virtual void  DoSetupMenus(); // Override
  45.     virtual void  DoMenuCommand(CommandNumber aCommandNumber); // Override
  46.  
  47.     // Saving and Restoring
  48.     virtual void  DoNeedDiskSpace(TFile* itsFile,
  49.                                   long& dataForkBytes,
  50.                                   long& rsrcForkBytes); // Override
  51.     virtual void  DoRead(TFile* aFile,
  52.                          Boolean forPrinting); // Override
  53.     virtual void  DoWrite(TFile* aFile,
  54.                           Boolean makingCopy); // Override
  55.  
  56. };
  57.  
  58. #endif
  59.